package com.kahluastudios.mealfinder.desktop.client;

import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.ui.TabLayoutPanel;
import com.kahluastudios.mealfinder.desktop.client.friends.FriendsPanel;
import com.kahluastudios.mealfinder.desktop.client.recommendations.RecommendationsPanel;
import com.kahluastudios.mealfinder.desktop.client.restaurants.RestaurantPanel;
import com.kahluastudios.mealfinder.desktop.client.reviews.ReviewsPanel;
import com.kahluastudios.mealfinder.desktop.client.settings.SettingsPanel;

public class LandingPanel extends TabLayoutPanel {

	private static final double BAR_HEIGHT = 2.5;
	
	private MealfinderContext context;
	
	private RecommendationsPanel recommendationsPanel;
	private ReviewsPanel reviewsPanel;
	private RestaurantPanel restaurantPanel;
	private FriendsPanel friendsPanel;
	private SettingsPanel settingsPanel;
 
	
	public LandingPanel(MealfinderContext context) {		
		super(BAR_HEIGHT, Unit.EM);		
		this.context = context;
		
		this.recommendationsPanel = new RecommendationsPanel(context);
		add(this.recommendationsPanel, "Recommended to me");
		this.reviewsPanel = new ReviewsPanel(context);
		add(this.reviewsPanel,"Recommended by me");
		
		this.restaurantPanel = new RestaurantPanel(context);
		add(this.restaurantPanel,"Restaurants");

		this.friendsPanel = new FriendsPanel(context);
		add(this.friendsPanel, "Friends");
		
		this.settingsPanel = new SettingsPanel(context);
		add(settingsPanel, "My Account");
	}

	
	
	public ReviewsPanel getReviewsPanel() { return this.reviewsPanel; }

	public RecommendationsPanel getRecommendationsPanel() { return this.recommendationsPanel; }

	public SettingsPanel getSettingsPanel() { return this.settingsPanel; }	
	
}
